﻿using GraphProcessor;
using IQIGame.Onigao.Logic;
using LFloatMath.Math;
using UnityEngine;

namespace IQIGame.Onigao.GamePlay.Editors
{
    [System.Serializable, NodeMenuItem(SkillEditorConst.Target + "/" + SkillEditorConst.Fan, typeof(SkillEditorGraph))]
    public class SkillTargetSelectNode_Fan : SkillTargetSelectNode
    {
        [InspectorName("半径")] public float raduis;
        [InspectorName("圆心移动半径")] public float centerRange;
        [InspectorName("角度")] public float angle;
        protected override ETargetSelectType targetType => ETargetSelectType.Fan;
        protected override bool checkRelation => true;
        
        protected override SkillCustomConfig CreateConfig()
        {
            return new TargetSelect_Fan_ConfigData()
            {
                raduis = ((LFloat)this.raduis)._val,
                centerRange = ((LFloat)this.centerRange)._val,
                angle = ((LFloat)this.angle)._val
            };
        }
    }
}